let { $, layer, table, form } = layui;
export default class Delete {
    constructor(tableIns, obj) {
        this.handle(tableIns, obj);
    }
    handle(tableIns, obj) {
        layer.confirm('真的删除行么', function (index) {
            obj.del();
            $.ajax({
                type: 'delete',
                url: '/fac/' + obj.data._id,
                success(res) {
                    console.log(res);
                    layer.msg('删除成功');
                    layer.close(index);
                    tableIns.reload();
                },
            })
        });
    }
}